{extend name="layouts/main" /}
{block name="link"}{/block}
{block name="content"}
<div class="layui-tab layui-tab-brief" lay-filter="demoTitle">
	<div class="layui-body layui-tab-content site-demo site-demo-body" style="top: 0px;left: 0px;">
		<div class="layui-tab-item layui-show">
			<div class="layui-main">
				<div id="LAY_preview">
					<blockquote class="layui-elem-quote layui-text" style="margin-bottom: 5px;">
						<i class="fa fa-home"></i>
						<span class="layui-breadcrumb">
							<a><cite>系统主页</cite></a>
							<a><cite>广告位管理</cite></a>
						</span>
					</blockquote>
					<div class="layui-fluid" style="position: relative;margin: 0 auto;padding: 0 0px;">
						<div class="layui-set">
							<div class="layui-set-from">
								<form class="layui-form" action="">
									<div class="layui-form-item" style="margin-bottom: -8px;">
										<div class="layui-input-inline" style="margin-right: 5px;">
											<input type="text" name="title" value="{:input('title')}" placeholder="搜索关键词" autocomplete="off" class="layui-input">
										</div>
										<div class="layui-input-inline" style="width:80px">
											<button class="layui-btn" id="search" style="height: 36px;"><i class="layui-icon"></i></button>
										</div>
									</div>
								</form>
							</div>
						</div>
						<div class="layui-card" style="overflow-y: hidden;float: left;width: 100%;">
							<form class="layui-form" action="">
								<table class="layui-table" lay-filter="tableEvent">
									<colgroup>
										<col width="1%">
										<col width="5%">
										<col width="6%">
										<col>
										<col>
										<col width="20%">
									</colgroup>
									<thead>
										<tr>
											<th>
												<input type="checkbox" id="allChoose" lay-skin="primary" lay-filter="allChoose">
											</th>
											<th>ID</th>
											<th>排序</th>
											<th>广告位名称</th>
											<th>广告位描述</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>
										{volist name="list" id="info"}
										<tr>
											<td>
												<input type="checkbox"  name="ids[]" value="{$info.id}" class="ids" lay-skin="primary" lay-filter="c_one">
											</td>
											<td>{$info.id}</td>
											<td><input name="sort[{$info.id}]" value="{$info.sort}" type="text"  class="layui-input sort"  lay-filter="weight" ></td>
											<td>{$info.name}</td>
											<td>{$info.description}</td>
											<td>
												<div class="layui-inline">
													<a class="layui-btn layui-btn-xs" href="javascript:;" onclick="x_admin_show('编辑广告位','{:url('edit',array('id'=>$info['id']))}','','',1)">
														<i class="layui-icon layui-icon-edit"></i>编辑
													</a>
												</div>
												<div class="layui-inline">
													<a class="layui-btn layui-btn-xs layui-btn-danger confirm ajax-get" url="{:url('del',array('ids'=>$info['id']))}">
														<i class="layui-icon layui-icon-delete"></i>删除
													</a>
												</div>
											</td>
										</tr>
										{/volist}
										<tr>
											<td align="left" colspan="10" style="padding-left:0;">
												&nbsp;
												<div class="layui-inline">
													<a href="javascript:;" onclick="x_admin_show('新增广告位','{:url('add')}','','',1)" class="layui-btn layui-btn-sm">新增</a>
												</div>
												<div class="layui-inline">
													<a href="" class="layui-btn layui-btn-sm ajax-post" target-form="sort" url="{:url('sort')}" title="排序">排序</a>
												</div>
												<div class="layui-inline">
													<a href="" class="layui-btn layui-btn-sm layui-btn-danger confirm ajax-post" target-form="ids" url="{:url('del')}">删除</a>
												</div>
											</td>
										</tr>
									</tbody>
								</table>
							</form>
							<div id="page">
								<div class="layui-box layui-laypage layui-laypage-default">
									<div class="pagelistbox">
										{$list|raw}
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{/block}
